import { Component, OnInit, EventEmitter, Output } from '@angular/core';
import { PriceQuote } from '../order/order.component';

@Component({
  selector: 'app-price-quote',
  templateUrl: './price-quote.component.html',
  styleUrls: ['./price-quote.component.css']
})
export class PriceQuoteComponent implements OnInit {

  private stockCode: string = "Google";
  private price: number;
  @Output()
  private priceQuotedEvent: EventEmitter<PriceQuote> = new EventEmitter<PriceQuote>();
  constructor() { }

  ngOnInit() {
  }
  quotePrice(e) {
    this.priceQuotedEvent.emit(new PriceQuote(this.stockCode, this.price));
  }
}
